<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 航空旅客付费选座意愿识别系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Poppins:wght@400;600;800&display=swap" rel="stylesheet">
    <style>
        :root {
            --neon-pink: #ff00cc;
            --neon-purple: #9900ff;
            --dark-bg: #0f172a;
            --card-bg: rgba(15, 23, 42, 0.85);
        }
        
        body {
            font-family: 'Poppins', 'Noto Sans SC', sans-serif;
            background-color: var(--dark-bg);
            color: white;
            background-image: 
                radial-gradient(circle at 10% 90%, rgba(255, 0, 204, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 10%, rgba(153, 0, 255, 0.1) 0%, transparent 40%);
            min-height: 100vh;
            padding: 2rem 0;
        }
        
        .auth-container {
            max-width: 500px;
            margin: 0 auto;
            padding: 0 1rem;
        }
        
        .auth-card {
            background: var(--card-bg);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            position: relative;
        }
        
        .auth-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
        }
        
        .auth-header {
            padding: 2rem;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .auth-header h1 {
            font-weight: 800;
            margin: 0;
            font-size: 2rem;
            background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .auth-body {
            padding: 2rem;
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-label {
            display: block;
            margin-bottom: 0.7rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.8);
        }
        
        .form-control {
            width: 100%;
            padding: 0.9rem 1rem;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--neon-purple);
            box-shadow: 0 0 15px rgba(153, 0, 255, 0.3);
        }
        
        .btn {
            width: 100%;
            padding: 1rem;
            border-radius: 8px;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            margin-top: 1rem;
        }
        
        .btn-gradient {
            background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
            color: white;
            box-shadow: 0 0 15px rgba(255, 0, 204, 0.3);
        }
        
        .btn-gradient:hover {
            box-shadow: 0 0 25px rgba(255, 0, 204, 0.5);
            transform: translateY(-3px);
        }
        
        .auth-footer {
            text-align: center;
            padding: 1.5rem 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .auth-footer p {
            margin: 0;
            color: rgba(255, 255, 255, 0.6);
        }
        
        .auth-footer a {
            color: var(--neon-pink);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .auth-footer a:hover {
            color: var(--neon-purple);
            text-decoration: underline;
        }
        
        .alert {
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            border: none;
        }
        
        .alert-danger {
            background: rgba(239, 68, 68, 0.2);
            color: #fca5a5;
        }
        
        .alert-success {
            background: rgba(16, 185, 129, 0.2);
            color: #a7f3d0;
        }
        
        .input-icon {
            position: relative;
        }
        
        .input-icon i {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.5);
        }
    </style>
</head>
<body>
    <div class="auth-container">
        <div class="auth-card">
            <div class="auth-header">
                <h1><i class="fa fa-user-plus"></i> 注册账号</h1>
            </div>
            
            <div class="auth-body">
                {% with messages = get_flashed_messages(with_categories=true) %}
                    {% if messages %}
                        {% for category, msg in messages %}
                            <div class="alert alert-{{ category }}">
                                <i class="fa fa-{{ 'check-circle' if category == 'success' else 'exclamation-circle' }}"></i> {{ msg }}
                            </div>
                        {% endfor %}
                    {% endif %}
                {% endwith %}
                
                <form method="post">
                    <div class="form-group">
                        <label for="username" class="form-label">用户名</label>
                        <div class="input-icon">
                            <input type="text" id="username" name="username" class="form-control" placeholder="请输入用户名" required>
                            <i class="fa fa-user"></i>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="email" class="form-label">电子邮箱</label>
                        <div class="input-icon">
                            <input type="email" id="email" name="email" class="form-control" placeholder="请输入电子邮箱" required>
                            <i class="fa fa-envelope"></i>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="password" class="form-label">密码</label>
                        <div class="input-icon">
                            <input type="password" id="password" name="password" class="form-control" placeholder="请输入密码" required>
                            <i class="fa fa-lock"></i>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="confirm_password" class="form-label">确认密码</label>
                        <div class="input-icon">
                            <input type="password" id="confirm_password" name="confirm_password" class="form-control" placeholder="请再次输入密码" required>
                            <i class="fa fa-lock"></i>
                        </div>
                    </div>
                    
                    <button type="submit" class="btn btn-gradient">
                        <i class="fa fa-paper-plane"></i> 注册账号
                    </button>
                </form>
            </div>
            
            <div class="auth-footer">
                <p>已有账号？<a href="{{ url_for('login') }}">立即登录</a></p>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 添加表单验证动画效果
        document.querySelectorAll('.form-control').forEach(input => {
            input.addEventListener('focus', () => {
                input.parentElement.style.transform = 'scale(1.02)';
                input.parentElement.style.transition = 'transform 0.3s ease';
            });
            
            input.addEventListener('blur', () => {
                input.parentElement.style.transform = 'scale(1)';
            });
        });
    </script>
</body>
</html>